As more small and midsize U.S. businesses take the plunge into overseas markets, HR leaders are learning how to shape their company’s compensation and culture to recruit and retain the best workers globally.