installer: use mysqli_error when using mysqli (closes #696)