Fix install of MagLev on Macs

Fixes issue #2984