fixes for AVR build
fixes for visual studio build