I gather from your post that this is an issue with libraries that you are creating yourself?
In addition to the .ms file you need some additional code in the XML for the quality selector to work as shown below
This code is needed to fire the maxscript function when the material is loaded
<maxscript file="forestlib.ms" script='onMaterialLoad "$(LIBMATERIAL)" "$(PRESET_QUALITY)"' execute_on="material_load"/>
And this code adds the Quality drop down to the library browser
<select class="quality" label="Render quality (V-Ray/Mental)" setmacro="PRESET_QUALITY">
<option value="high" default="1">High</option>
For example, please check the lawns presets which use both these snippets.