Search for magnetic monopoles in the cosmic radiation with the MACRO detector at Gran Sasso