Swelling-induced wrinkling in layered gel beams