Near-infrared photometry and spectroscopy of NGC 6539 and UKS 1: two intermediate metallicity bulge globular clusters