Better logic for packaged app platform selection (bug 879372)