Android print() fix

This is the most elegant solution I found.