Dont know where you play but that happens so rarely its not even worth doing the precise math. If you wanted to it looks like this:
You estimate the edge (x) you have over your opponent if you never limped. You choose a hand of which equity is <(x), limp with it and call his push.
This assumes you are definitely sure that his hand is random (i.e that he does push _every_ hand when you limp)
www.pokerstove.com for further investigation.