Some fixes for proper embedded compilation