Strange hadron production in pp and pPb collisions at sNN=5.02 TeV