Del Potro beats Nadal in Shanghai Masters semis