Fixes for Arduino Due and also pre-1.0 IDE