Fix for https://github.com/scalableminds/amd-optimize/issues/18