Effect of nanoscale size and medium on metal work function in oleylamine-capped gold nanocrystals