Fix arduino compilation issues