Enzymatic formation of lactams in organic solvents