more tweaks to compile on OS 10.7