Recovery of methanol from waste streams