Solving QMLTP Problems by Translation to Higher-order Logic