Add a foreign library definition so that it loads properly on OSX
Use IOLIB instead of platform-specific value for E2BIG
Merge pull request #3 from lokedhs/master

Fix usage on OSX