Getting library to work on OSX

This is a bit of a speculative PR as I was unable to use your library. Perhaps I was going about it the wrong way. The commits note the problem and work around. Please feel free to close if it is not appropriate...

Thanks,
Ross