Set returnValues correctly when the spied function is called as a constructor