Engine with variable compression ratio