Fix 5.1 compat

Signed-off-by: katlogic <kat@lua.cz>