Unify image loading, fix tile map Mac bug