I think you should be able to do this by setting the 'prof.logicalExpression' entry in $myparams. Use a markup-based structure to indicate the conditions you want profiled-details can be found in the Customizer's Guide, chapter 3. For example, $myparams["prof.logicalExpression"] = "<profileref alias="platform" <br="/>value='UNIX'/>" to profile for the UNIX platform. You can use the LogicalExpression structure described in the Customizer's Guide to specify a complicated logical profile condition, e.g. platform=UNIX AND (userlevel = novice OR userlevel = typical).
The usual caveats apply-code is untested, debugging left as an exercise, etc. etc.