Fix error reporting on older Mojolicious versions