minor compat fixes for mac