Generation of internal gravity waves by penetrative convection