Correlation between the photoluminescence lifetime and defect density in bulk and epitaxial ZnO