GWT emulate https://github.com/libgdx/libgdx/commit/c4c0db96097ee51ebdda6de7b2c40a2fd4386e8d