Fixing some things that prevented SML/NJ compilation