3.0 marshaller fix

Fixes https://github.com/cakephp/cakephp/issues/3343