Fix external module check on OS X.