Pairings between measures and bounded functions and compensated compactness