Onset of double-diffusive convection in a rectangular cavity with stress-free upper boundary