Replace BASHism with curl options