Fixed warnings in OSX.
Fixed warnings in Linux (under gcc 4.6)