Port recent Godot core math fixes to Kotlin core types (#907)