Use this.options not defaults when detecting presence of collapsed class

Detection of collapsed class only works if you're using the default class names, this fixes it so it also uses any user-defined class from `this.options`,