Eco-friendly synthesis of 5-hydroxymethylfurfural (HMF) and its application to the Ferrier-rearrangement reaction