fixed declarations for mac osx