fixed check for osx, which uses dylib extension