fix to compile with Mac Darwin