SPI specific fixes for OSX compilation