add osx support

Hello,
I wanted to use this plugin but run into issues with osx. This pullrequest adds basic osx support for your plugin. cheers!