Include auto-detection of RAM size on OS X.

Call `sysctl hw.memsize` and parse the result, which seems
to be the simplest way to find this information on OS X.