Fix to mode switching

Added a call to zeroIntegralError() when switching from attitude to
stable mode. This fixes a problem where high gyro I term in rate mode
would cause the craft to lean one direction very hard when switching
modes (from attitude to rate).

Also added a couple things for compiling for STM32 on OS X.
Merge pull request #363 from imchipwood/development

Fix to mode switching