fix library finding on OS X. Closes #7