Hi Tobias,
I had a similar issue today – white-space was causing a Parse error: syntax error, unexpected T_FUNCTION when I tried to activate extension plugin. I had copied the code directly from your website. I fixed it by first pasting the code into TextEdit and making it plain text. Then copied this into my file.
(awesome plugin by the way)