You can't access sketch-internal variables, only functions. You'll have to write a getting function for it, and then it'll work.
boolean getMousePressValue() { return mousePressed; }
That said: you really don't. You can simply add a click, mousedown, mouseup listener to the canvas, which will give you the same information in a pure-JS way, which you seem to be doing anyway. Just use:
pjsCanvas.addEventListener("mousedown",function(){...},false);
pjsCanvas.addEventListener("mouseup",function(){...},false);
Done. No need to reach into the sketch for that information.