Security Hardening of Intelligent Reflecting Surfaces