try to use mmap hugetlb only on Linux

Fixes compilation error on OS X (thanks to Marius for reporting)
Merge remote-tracking branch 'upstream/master'