This is Linux-dependent, you need to also check for 'dll' on Cygwin or 'dylib' on OSX.