Boundedness of solutions to variational problems under general growth conditions