HMC5883L tilt compensation
No. You need an accelerometer.

If you read the article you link to you can see this bit:


  There are many margin of improvement. First, we ought compensate the potential tilt of the device using the accelerometer data from the ADXL345, for example using the info on my previous post!


To do tilt compensation you need three axes of both magnetometer data and accelerometer data to scale and merge those three axes.