cherry-pick from master to 5.0

https://github.com/pentaho/pentaho-commons-gwt-modules/commit/941b919cacb59b74276e2a92b011eab5826b639c
https://github.com/pentaho/pentaho-commons-gwt-modules/commit/2c4a503565380aad704344f30d7e99ef0e034c2b