Mac: use CFBundle to get plugin bundle info. Clean up code.