You may have stumbled upon a solution here. Make it legal to ask the question, but also make it legal to lie about the answer (including doctoring paystubs, etc). Seems like a uniquely libertarian solution.
I don't think it really solves the problem. Making it legal to lie means employer can't sue you for fraud, but they can still fire you if they find out.
Speaking in terms of total comp (including benefits value) is helpful too. Many of them have very real dollar values associated with them.