Fixed some issues affecting OS X Snow Leopard

This commit fixes all the issues found in OS X Snow Leopard