Tweaks to compile (with warnings!) on OS X.