Fix legacy spec to string

Fix LegacySpecDepend.to_string when `python = None`

@sjagoe