Some fixes to make it compile with FF25