Ultraviolet to infrared emission of z>1 galaxies: Can we derive reliable star formation rates and stellar masses?