Ported fg system and math libraries to Windows.