Random lasing in a nanocomposite medium