fixed check for osx, which uses dylib extension

This patch fixes the problem with issue #3, where building this extension on osx fails. Tested with spidermonkey 1.7.0.