Adsorption-induced gap states of h-BN on metal surfaces