isn't valid SQL.select ? from ... where ..
?-style placeholders are used to pass variables into WHERE clauses, not to pass literals into the SELECT statement. I suspect that this is why your query only works if you specify the 4.x protocol level, as that does NOT support placeholders.
I'll still take a look at the issue you opened on GitHub, but I suspect that this is really a client side SQL issue more than anything else.