Improving flux pinning at high fields in intermetallic superconductors: clues from MgB/sub 2/ and MgCNi/sub 3/