minor patches for non-lua-rocks installed torch, still have to fix the hardcoding