Try to fix crash on OS X at getmntent()
Move static variables inside functions
Merge branch 'fix-osx-getmntent'