Experimental test of macroscopic realism in a superconducting flux qubit