FFmpeg/Libav require a "key=value" format so it requires a "=1". So for your example:
avconv -i input.mp4 -c:v libx265 -x265-params lossless=1 -c:a copy output.mp4
To confirm if it works (via command line) you should see the following log:
x265 [info]: Rate Control : Lossless
Refs: