Fix MemoryUsage extension for OS X

This fixes GH-529.