US mortgage rate hits near three-year high