Fixed bug in library so that it works under OS X