Learning Run-time Safety Monitors for Machine Learning Components