Nonparametric Maximum Likelihood Estimation of Probability Densities by Penalty Function Methods