cmake: improve __FILE__ relative path hack