Understanding the magnetic resonance spectrum of nitrogen vacancy centers in an ensemble of randomly-oriented nanodiamonds